
public class Camera {

   // TO DO: declare vairables
   private String brand;
   private int flength;
   private boolean shutterPressed;

   // TO DO: Define the getter and setter methods
  public String getBrand(){
  	return brand;
  }

  public int getFlength(){
  	return flength;
  }

  public boolean getShutter(){
  	return shutterPressed;
  }

  public void setBrand(String b){
  	brand = b;
  }

  public void setFlength(int f){
  	flength = f;
  }

  public void setShutter(boolean s){
  	shutterPressed = s;
  }



  /**
     * Test code
     * @param args Command-line parameters representing user input
     * for the tests.
     */

    public static void main(String[] args) {

        Camera[] cameraArray = {
            new Camera(),
            new Camera(),
            new Camera()
        };

          int count = 0;
        for (int i = 0; i < cameraArray.length; ++i) {
           //TO DO : to set values to the attributes
           cameraArray[i].setBrand(args[count++]);
           int a = Integer.parseInt(args[count++]); //convert String to int
           cameraArray[i].setFlength(a);
           boolean  b = Boolean.valueOf(args[count++]).booleanValue(); // Convert String to boolean
           cameraArray[i].setShutter(b);
        }

        // basic test

	for (int i = 0; i < cameraArray.length; ++i) {
	// TO DO : to get values and print the required output
	       System.out.println("Camera"+i);
	       System.out.println("Brand is: "+cameraArray[i].getBrand()+", Focal Length is: "+cameraArray[i].getFlength()+", Shutter Pressed is: "+cameraArray[i].getShutter());
        }

        //TO DO: comparison test

        if (cameraArray[1].getBrand().equals(cameraArray[0].getBrand())){
        	System.out.println("Camera 1 and Camera 0 have the same brand!");
        }
        else {
        	System.out.println("Camera 1 and Camera 0 have different brands!");
        }

        if (cameraArray[2].getBrand().equals(cameraArray[0].getBrand())){
        	System.out.println("Camera 2 and Camera 0 have the same brand!");
        }
        else {
        	System.out.println("Camera 2 and Camera 0 have different brands!");
        }

        if (cameraArray[2].getBrand().equals(cameraArray[1].getBrand())){
        	System.out.println("Camera 2 and Camera 1 have the same brand!");
        }
        else {
        	System.out.println("Camera 2 and Camera 1 have different brands!");
        }
    }
}